<?php

declare(strict_types=1);
/**
 * This file is part of MoChat.
 * @link     https://mo.chat
 * @document https://mochat.wiki
 * @contact  group@mo.chat
 * @license  https://github.com/mochat-cloud/mochat/blob/master/LICENSE
 */
namespace MoChat\Plugin\SystemConfig\Action\Admin;

use Hyperf\Contract\StdoutLoggerInterface;
use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\RequestMapping;
use MoChat\Framework\Action\AbstractAction;
use MoChat\Framework\Request\ValidateSceneTrait;
use MoChat\Plugin\SystemConfig\Logic\OemInfoLogic;

/**
 * 获取OEM信息
 * Class OemInfo.
 * @Controller
 */
class OemInfo extends AbstractAction
{
    use ValidateSceneTrait;

    /**
     * @Inject
     * @var StdoutLoggerInterface
     */
    protected $logger;

    /**
     * @Inject
     * @var OemInfoLogic
     */
    private $oemInfoLogic;

    /**
     * @RequestMapping(path="/admin/systemConfig/oemInfo", methods="get")
     */
    public function handle(): array
    {
        return $this->oemInfoLogic->handle();
    }
}
